package psrc.logic.pages.representante;

import java.util.ArrayList;
import java.util.List;

import psrc.logic.pages.base.ControllerBase;
import psrc.logic.util.beans.RepresentanteBean;

public class LoadRepresentanteSeeController extends ControllerBase {

	private static final long serialVersionUID = 1L;

	List<RepresentanteBean> representantes = new ArrayList<RepresentanteBean>();
	
	@Override
	public String executeController() throws Exception {
		RepresentanteModel model = new RepresentanteModel();
		try{
			this.representantes = model.getRepresentantesList();
		} catch (Exception e) {
			return "genericError";
		}
		return SUCCESS;
	}
	
	public List<RepresentanteBean> getRepresentantes() {
		return representantes;
	}

	public void setRepresentantes(List<RepresentanteBean> representantes) {
		this.representantes = representantes;
	}


}
